<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name ="keywords" content="购物专用浏览器,网购专用浏览器,购物返利,网购返利,网购省钱,网购安全,安全购物,打折,折扣,省钱达人,购物达人,淘宝"/>
<meta name="Description" content="购物专用浏览器,网购专用浏览器,购物返利,网购返利,网购省钱,网购安全,安全购物,打折,折扣,省钱达人,购物达人,淘宝" />
<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />
<title>购物兔</title>

<script language="javascript" src="js/common.js"></script>
<script language="javascript" src="js/jquery.min.js"></script>  
<script language="javascript">

var bShowEmail = false;
var g_opt = "";
var g_check = "0";
var g_bshowRecommend = false;
var g_code = "";

function OnRegister()
{
	var alipay = document.getElementById("alipay_id").value;
	var commend = document.getElementById("commend_id").value;
	var phone = document.getElementById("phone_id").value;
	var opt = document.getElementById("opt_id").value;
	
	if( alipay == "请输入您的支付宝帐号" || alipay == "" )
	{
		alert( "请输入您的支付宝帐号。\r\n返现的金额将转账至此账号中，请确保正确，否则将收不到返现金额。" );
		document.getElementById("alipay_id").focus();
		return;
	}
	else
	{
		if( (!isemail( alipay )) && (!isphone( alipay )) )
		{
			alert( "您输入的支付宝帐号格式不对哦，请确认是支付宝账号，您可能输入的是淘宝账号。" );
			document.getElementById("alipay_id").focus();
			return;
		}
	}
	
	//开启检测推荐id check=0 不开启检测
	if( g_bshowRecommend == true && g_check != "0" )
	{
		if( commend == "请输入邀请码" || commend == "" )
		{
			alert( "要使用购物兔，需要邀请码哦\r\n\r\n如果您没有邀请码，可以找使用过购物兔的朋友要\r\n\r\n或者，加入我们Q群25276471申请。" );
			document.getElementById("commend_id").focus();
			return;
		}
		
		//if( !isnumber(commend) )
		//{
		//	alert( "您输入的激活码有误!\r\n\r\n如果您没有邀请码，可以找使用过购物兔的朋友要\r\n\r\n或者，加入我们Q群25276471申请。" );
		//	document.getElementById("commend_id").focus();
		//	return;
		//}
		
		var url = "checkcommend.php?commend=" + commend;
		var html = $.ajax({	url: url,
						  	async: false
						 }).responseText;
		
		if( html != "1" )
		{
			alert("您输入的激活码有误!\r\n\r\n如果您没有邀请码，可以找使用过购物兔的朋友要\r\n\r\n或者，加入我们Q群25276471申请。" );
			document.getElementById("commend_id").focus();
			return;
		}
	}
	
	if( bShowEmail )
	{
		if( phone == "请输入您的电子邮箱" || phone == "" )
		{
			if(!confirm( "确定不输入电子邮箱吗？\r\n\r\n请点击“取消”，重新输入电子邮箱。" ) )
			{
				document.getElementById("phone_id").focus();
				return;
			}
			
			document.getElementById("phone_id").value = "";
			phone = "";
		}
		else if( !isemail( phone ) )
		{
			alert( "您输入的电子邮箱有误。" );
			document.getElementById("phone_id").focus();
			return;
		}
	}
	else
	{
		if( phone == "请输入您的手机号码" || phone == "" )
		{
//			if(!confirm( "确定不输入手机号码吗？当返现时，淘宝官方会发送免费短信通知您，\r\n如果不填写，将收不到短信通知哦。\r\n\r\n请点击“取消”，重新输入手机号码。" ) )
			alert( "手机是必须输入的哦~\r\n\r\n当返现时，淘宝官方会发送免费短信通知您。" );
			{
				document.getElementById("phone_id").focus();
				return;
			}
			
			document.getElementById("phone_id").value = "";
			phone = "";
		}
		else if( !isphone( phone ) )
		{
			alert( "您输入的手机号码有误。\r\n\r\n当返现时，淘宝官方会发送免费短信通知您，\r\n如果手机号码有误，将收不到短信通知哦。" );
			document.getElementById("phone_id").focus();
			return;
		}
	}
	
	if( commend == "请输入邀请码" )
	{
		document.getElementById("commend_id").value = "";
		commend = "";
	}
	
//	external.WebComm_SetInfo( alipay, phone );
//	if( (opt == "0" || opt == 0 ) && isnumber( commend ) )
//		external.WebComm_SetCommend( commend );
		
	document.getElementById("RegId").submit();
}

function ShowOneLayer( tipId, bShow )
{
	if( bShow )
	{
		document.getElementById("tb_tip").style.visibility = "hidden";
		document.getElementById("commend_tip").style.visibility = "hidden";
		document.getElementById("phone_tip").style.visibility = "hidden";
		document.getElementById("email_tip").style.visibility = "hidden";
		document.getElementById(tipId).style.visibility = "";		
	}
	else
	{
		document.getElementById("tb_tip").style.visibility = "hidden";
		document.getElementById("commend_tip").style.visibility = "hidden";
		document.getElementById("phone_tip").style.visibility = "hidden";
		document.getElementById("email_tip").style.visibility = "hidden";
		document.getElementById(tipId).style.visibility = "hidden";	
	}
}

function OnMouseUp( obj )
{
	var value = obj.value;
	var id = obj.id;
	
	if( id == "alipay_id" )
	{
		if( value =="请输入您的支付宝帐号" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
		
		ShowOneLayer( "tb_tip", true );
	}
	else if( id == "commend_id" )
	{
		if( value =="请输入邀请码" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
	
		ShowOneLayer( "commend_tip", true );
	}
	else if( id == "phone_id" )
	{
		if( value =="请输入您的手机号码" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
		
		ShowOneLayer( "phone_tip", true );
	}
	else if( id == "email_id" )
	{
		if( value =="请输入您的电子邮箱" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
		
		ShowOneLayer( "email_tip", true );
	}
}

function OnMouseOutAlipay( obj )
{
	var alipay = document.getElementById("alipay_id").value;
	bShowEmail = isphone( alipay );
	if( bShowEmail )
	{
		document.getElementById("phone_or_email_text").innerHTML = "电子邮箱";
		if( document.getElementById( "phone_id" ).value == "" || document.getElementById( "phone_id" ).value == "请输入您的手机号码" )
			document.getElementById( "phone_id" ).value = "请输入您的电子邮箱";
		document.getElementById("use_phone_id").value = "0";	
	}
	else
	{
		document.getElementById("phone_or_email_text").innerHTML = "手机号码";
		if( document.getElementById( "phone_id" ).value == "" || document.getElementById( "phone_id" ).value == "请输入您的电子邮箱" )
			document.getElementById( "phone_id" ).value = "请输入您的手机号码";
		document.getElementById("use_phone_id").value = "1";
	}
	
	if( obj.value == "" )
	{
		obj.value = "请输入您的支付宝帐号";
		obj.style.color = "#CCCCCC";
	}
	
	ShowOneLayer( "tb_tip", false );
	
	if( alipay != "" && alipay != "请输入您的支付宝帐号" )
	{
		var url = "checkuser.php?tb_id=" + alipay;
		var html = $.ajax({	url: url,
							async: false
						 }).responseText;
		
		//不需要检测
		if( html == "1" || g_opt == "change" || g_opt == "getcommendurl"  || g_check == "0" || g_code)
			ShowRecommend( false );
		else
			ShowRecommend( true );
	}
}

function OnMouseUpEx( obj )
{
	if( bShowEmail )
	{
		if( obj.value =="请输入您的电子邮箱" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
		
		ShowOneLayer( "email_tip", true );
	}
	else
	{
		if( obj.value =="请输入您的手机号码" )
		{
			obj.value = "";
			obj.style.color = "#000000";
		}
		
		ShowOneLayer( "phone_tip", true );
	}
}

function OnMouseOutEx( obj )
{
	if( bShowEmail )
	{
		if( obj.value =="" )
		{
			obj.value = "请输入您的电子邮箱";
			obj.style.color = "#CCCCCC";
		}
		
		ShowOneLayer( "email_tip", false );
	}
	else
	{
		if( obj.value =="" )
		{
			obj.value = "请输入您的手机号码";
			obj.style.color = "#CCCCCC";
		}
		
		ShowOneLayer( "phone_tip", false );
	}
}

function OnMouseOut( obj )
{
	var value = obj.value;
	var id = obj.id;
	
	if( id == "alipay_id" )
	{
		if( value =="" )
		{
			obj.value = "请输入您的支付宝帐号";
			obj.style.color = "#CCCCCC";
		}
		
		ShowOneLayer( "tb_tip", false );
	}
	else if( id == "commend_id" )
	{
		if( value =="" )
		{
			obj.value = "请输入邀请码";
			obj.style.color = "#CCCCCC";
		}
		
		ShowOneLayer( "commend_tip", false );
	}
	else if( id == "phone_id" )
	{
		if( value =="" )
		{
			obj.value = "请输入您的手机号码";
			obj.style.color = "#CCCCCC";
		}
		
		ShowOneLayer( "phone_tip", false );
	}
	else if( id == "email_id" )
	{
		if( value =="" )
		{
			obj.value = "请输入您的电子邮箱";
			obj.style.color = "#CCCCCC";
		}
		
		ShowOneLayer( "email_tip", false );
	}
}

function OnBodyLoad()
{
	ShowRegisterResult();
	g_code = GetUrlParam("code=");
	if (g_code == "")
		g_code = getCookie("recommend_code");

	if (g_code)
	{
		document.getElementById( "commend_id" ).value = g_code;
		document.getElementById( "commend_id" ).style.visibility = "hidden";
		document.getElementById( "commend_f_id" ).innerHTML="您是朋友推荐的用户，无需邀请码";;
	}
}

function ShowRecommend( bShow )
{
	if( bShow )
	{
		document.getElementById( "commend_text_id" ).style.visibility = "";
		if (document.getElementById("commend_id").value == "" || document.getElementById("commend_id").value == "请输入邀请码")
			document.getElementById( "commend_tip_id" ).style.visibility = "";
		document.getElementById( "commend_id" ).style.visibility = "";
	}
	else
	{
		document.getElementById( "commend_text_id" ).style.visibility = "hidden";
		document.getElementById( "commend_tip_id" ).style.visibility = "hidden";
		document.getElementById( "commend_id" ).style.visibility = "hidden";
	}
	
	g_bshowRecommend = bShow;
}
	
function ShowRegisterResult()
{
	
	//alert( window.location );
	var hr = GetUrlParam("hr=");
	var userid=GetUrlParam("userid=");
	g_opt = GetUrlParam("opt=");
	g_check = "0";//GetUrlParam("check=");
	
	if( g_opt == "change" )
		document.getElementById( "opt_id" ).value = "1";
	
	if( g_opt == "getcommendurl" )
		document.getElementById( "opt_id" ).value = "3";
	
	ShowRecommend( false );
	
	if( hr != "")
	{
		var strResult = "";
		switch( hr )
		{
			case "1":
//				strResult = "设置成功。";
//				alert( strResult );
//				external.WebComm_Close( userid, 1 );
			break;
			
			default:
				strResult = "该支付宝帐号已经被占用。";
				alert( strResult );
				document.getElementById("alipay_id").focus();
			break;
		}
	} 
}

</script>
<style type="text/css">
<!--
body,td,th {
	font-family: 宋体;
	font-size: 13px;
	color: #000;
}
body {
	background-color: #FFF;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

.input_border{
	border:#849CAB 1px solid;
	width:220px;
	color:#CCCCCC;
	background-color:#F9FCFF;
	height:16px;
	padding:4px;
	vertical-align:middle;
}

.input_border2{
	border:#849CAB 1px solid;
	width:130px;
	color:#CCCCCC;
	background-color:#F9FCFF;
	height:16px;
	padding:4px;
	vertical-align:middle;
}

.btn_type{
	width:60px;
	height:25px;
}
.STYLE1 {color: #990000}
-->
</style></head>

<body scroll="no" >
<table cellpadding="0" cellspacing="0" border="0" width="588" align="center">
	<tr>
    	<td align="center" valign="middle" width="588" height="65">
   	    <img src="images/reg_title.jpg" width="207" height="35" /></td>
    </tr>
    <tr>
        <td align="left" colspan="2" height="0" >
        </td>
    </tr>
    <tr>
    	<td height="22" valign="middle" style=" padding-left:20px;">购物成功后，<span style="font-weight:700; color:#FF4E00">返现金额</span>将直接转入所绑定的<span style="font-weight:700; color:#FF4E00">支付宝账号</span>中，淘宝官方将会发送免费短信通知您。</td>
    </tr>
    <tr>
    	<td height="22" valign="middle" style=" padding-left:20px;">
        如果您不理解返现的原理，请点击：<img src="images/info_icon.gif" width="14" height="14" /><a href="help1.html" target="_blank">了解为什么购物兔能省钱</a>
        </td>
    </tr>
    <tr>
    	<td height="22" valign="middle" style=" padding-left:20px;">
        如果您担心安全问题，请点击：<img src="images/info_icon.gif" width="14" height="14" /><a href="faq.html#1" target="_blank">了解为什么使用购物兔是安全的</a>
        </td>
    </tr>
    <tr>
    	<td>
       	  <form action="register.php" method="get" id="RegId">
<table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
                    <tr>
                        <td align="left" colspan="2" height="1" >
                        </td>
                    </tr>
                    <tr>
                      <td align="left" colspan="2" height="34" style="font-size:14px; font-weight:700; padding-left:60px">
                        请填写账号信息：
                        </td>
                    </tr>
<tr>
                        <td width="150" height="28" align="right" >
                        <strong>支付宝账号：</strong></td>
<td width="434" align="left" height="32"><input type="text" name="alipay_id" id="alipay_id" class="input_border" value="请输入您的支付宝帐号" title="正确的支付宝帐号，才能获取返回现金" onfocus="javascript:OnMouseUp( this );" onblur="javascript:OnMouseOutAlipay(this);" tabindex="1">
                        &nbsp;<span style="color:#F00; font-weight:400; font-size:16px">*</span>
                        <a href="http://blog.gouwutu.com/?p=173" target="_blank">没有支付宝怎么办？</a></td>
          </tr>
                    <tr>
                        <td width="150" height="32" align="right">
                        <strong><span id="phone_or_email_text">手机号码</span>：</strong></td>
                      <td align="left"><input type="text" name="phone_id" id="phone_id" class="input_border" value="请输入您的手机号码"
                        onfocus="javascript:OnMouseUpEx( this );" onblur="javascript:OnMouseOutEx(this);" tabindex="2"/><input type="hidden" value="1" id="use_phone_id" name="use_phone"/>
                        </td>
                    </tr>
                    <tr>
                        <td width="150" height="32" align="right"><input name="opt" type="hidden" id="opt_id" value="0" />
                        <span id="commend_text_id" style="visibility:hidden"><strong>邀请码：</strong></span>
                        </td>
                      <td align="left">
                        <input type="text" name="commend_id" id="commend_id" class="input_border2" value="请输入邀请码"
                        onfocus="javascript:OnMouseUp( this );" onblur="javascript:OnMouseOut(this);" tabindex="3" style="visibility:hidden"/>
                        <span id="commend_f_id" style="color:#666">&nbsp;</span>
                        &nbsp;<span id="commend_tip_id" style="visibility:hidden; color:#666">您是第一次使用，需要邀请码 <a href="http://blog.gouwutu.com/?p=69" target="_blank">没有邀请码？</a></span></td>
                    </tr>
                    <tr>
                      <td align="center" colspan="2" height="20"></td>
                    </tr>
                    <tr>
                      <td align="center" height="34" colspan="2"><img src="images/reg_submit.jpg" width="104" height="36" style="cursor:pointer;" onclick="javascript:OnRegister();" id="submit_id"/></td>
          </tr>
                    
              </table>
          </form>
      <div id="tb_tip" style="position:absolute; left:466px; top:33px; width:143px; height:163px; z-index:2; visibility: hidden">
<div  style="position:absolute; left:39px; top:0px width:100px; height:108px; border:#849CAB 1px solid; background-color: #F9FCFF; ; padding:9px; line-height:16px; float:right; width: 81px; top: 32px;">
        打折下来的金额将返现到此帐号中，<font color="#33c301">您不需要担心安全问题，因为你无须输入密码</font>。
    </div>
    <div style="position:absolute; left:-2px; top:133px; width:42px; height:21px; z-index:3" >
    <img src="images/conor.gif" width="42" height="21" />
    </div>
</div>

<div id="commend_tip" style="position:absolute; left:441px; top:98px; width:143px; height:164px; z-index:2; visibility: hidden">
    <div style="position:absolute; left:39px; top:0px width:100px; height:124px; border:#849CAB 1px solid; background-color: #F9FCFF; padding:9px; line-height:16px; float:right; width: 81px; top: 18px;">如果您是朋友邀请的，请输入他的邀请码，这样他就能赚取到我们的推广奖励，对大家都有惊喜哦。</div>
    <div style="position:absolute; left:-2px; top:133px; width:42px; height:21px; z-index:3" >
    <img src="images/conor.gif" width="42" height="21" />
    </div>
</div>

<div id="email_tip" style="position:absolute; left:467px; top:64px; width:143px; height:164px; z-index:2; visibility:hidden">
    <div style="position:absolute; left:39px; top:0px width:100px; height:126px; border:#849CAB 1px solid; background-color: #F9FCFF; padding:9px; line-height:16px; float:right; width: 81px; top: 21px;">当有返现更高的产品或者有推广奖励时尚ipad和iphone4活动时，我们会通过电子邮件告诉您。
</div>
    <div style="position:absolute; left:-2px; top:133px; width:42px; height:21px; z-index:3" >
    <img src="images/conor.gif" width="42" height="21" />
    </div>
</div>

<div id="phone_tip" style="position:absolute; left:468px; top:62px; width:143px; height:164px; z-index:2; visibility: hidden">
    <div  style="position:absolute; left:39px; top:0px width:100px; height:103px; border:#849CAB 1px solid; background-color: #F9FCFF; padding:9px; line-height:16px; float:right; width: 81px; top: 41px;">返现时，淘宝官方会发送免费短信通知您，如果号码错误，将收不到短信通知。</div>
    <div style="position:absolute; left:-2px; top:133px; width:42px; height:21px; z-index:3" >
    <img src="images/conor.gif" width="42" height="21" />
    </div>
</div>
        </td>
    </tr>
    <tr>
      <td align="center">&nbsp;</td>
    </tr>
</table>

</body>
</html>
